<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #div1{
      width: 400px;
      height: 400px;
      background-color: red;
      resize: horizontal;
      overflow: hidden;
    }
    #div2{
        width: 800px;
        height: 100px;
        background-color: yellow;
    }
  </style>
</head>
<body>
<div id="div1">
  <div id="div2">
  </div>
</div>
</body>
</html>